﻿using OnHook.Framework.Pager;

namespace OnHook.Business.Dto.Xue
{
    /// <summary>
    /// 商品查询Dto
    /// </summary>
    public class XueSearchDto
    {
        /// <summary>
        /// 模糊搜索关键字
        /// </summary>
        public string Keyword { get; set; } = string.Empty;

        /// <summary>
        /// 序号
        /// </summary>
        public long? Period { get; set; }
    }

    /// <summary>
    /// 商品分页查询Dto
    /// </summary>
    public class XuePageSearchDto : XueSearchDto, IPagedSearchDto
    {
        private int _pageIndex = 1;

        /// <summary>
        /// 页码
        /// </summary>
        public int PageIndex
        {
            get { return _pageIndex; }
            set { _pageIndex = value > 0 ? value : 1; }
        }

        private int _pageSize = 20;

        /// <summary>
        /// 每页大小
        /// </summary>
        public int PageSize
        {
            get { return _pageSize; }
            set { _pageSize = value > 0 ? value : 20; }
        }

    }
}
